export const tableOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  selection:true,
  tip:false,
  height: 450,
  "column": [
    {
      "type": "input",
      "label": "唯一标识",
      "prop": "id",
      hide: true,
    }, {
      "type": "input",
      "label": "线路编码，不能重复",
      "prop": "lineCode",
      hide: true,
    }, {
      "type": "input",
      "label": "线路编码，不能重复",
      "prop": "stationCode",
      hide: true,
    }, {
      "type": "date",
      "label": "日期",
      "prop": "opertorTime",
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      search: true,
      searchRange: true,
      searchSpan: 12,
    }, {
      width: 120,
      "type": "input",
      "label": "售票员编号",
      "prop": "conductorId",
      hide: true,
    },{
      "type": "select",
      "label": "售票员",
      "prop": "conductorName",
      "searchLabelWidth":90,
      search: true,
      component: 'user-select',
      params: {
        userCodeKey: 'conductorJobNo',
        operateNo: "deviceOperateNum"
      },
      rules:[{
        required:true,
        message:"请输入售票员！",
        trigger:"blur"
      }]
    }, {
      width: 120,
      "type": "input",
      "label": "售票员工号",
      "prop": "conductorJobNo",
      hide: true,
    },{
      type: "select",
      label: "设备操作号",
      prop: "deviceOperateNum",
      search: "true",
      searchLabelWidth: 100,
      dicUrl: "/support/swpmdeviceoperationcode/page",
      props: {
        label: "operationCode",
        value: "operationCode",
        res: "data.records"
      },
      filterable: true,
      allowCreate: true,
      dicQuery: {
        size: -1
        //TODO 过滤售票员
      }
    }, {
      width: 100,
      "type": "select",
      "label": "售票员班次",
      "prop": "conductorShifts",
      search: "true",
	  searchLabelWidth: 100,
      //hide: true,
      dicUrl: '/admin/dict/type/stm_conductor_shift',
    }, {
      width: 120,
      "type": "input",
      "label": "合计售出张数",
      "prop": "totalSellNum",
      hide: true
    }, {
      width: 120,
      "type": "number",
      "label": "合计售出金额",
      "prop": "totalSellAmount",
      precision: 2,
      hide: true
    }, {
      "type": "select",
      "label": "状态",
      "prop": "approvalStatus",
      dicData: [{
        label: '未提交',
        value: "0"
      }, {
        label: '已提交',
        value: "1"
      }],
      search:true,
      searchValue:'0'
    },
    {
      type: "select",
      label: "确认状态",
      prop: "confirmStatus",
      dicData: [
        {
          label: "未确认",
          value: "0"
        },
        {
          label: "已确认",
          value: "1"
        }
      ],
      search: true,
      //hide: true,
      display: false
    },  {
      width: 120,
      hide: false,
      label: '是否加入报表差错',
      prop: 'isAddReprotError',
      type:'select',
      dicData: [{
        label: '是',
        value: '1'
      },{
        label: '否',
        value: '0'
      }],
    },  {
      width: 120,
      hide: false,
      label: '报表修改状态',
      prop: 'reportModifyStatus',
      type:'select',
      search: true,
	  searchLabelWidth: 100,
      dicData: [{
        label: '修改中',
        value: '1'
      },{
        label: '已完成',
        value: '0'
      }]
    },{
      "type": "input",
      "label": "关联日结算主表ID",
      "prop": "refConductorSettleId",
      hide: true,
    }, {
      "type": "input",
      "label": "电子预览主表ID",
      "prop": "refElectronicPreviewId",
      hide: true,
    }, {
      "type": "input",
      "label": "部门ID",
      "prop": "deptId",
      hide: true,
    }, {
      "type": "input",
      "label": "创建人ID",
      "prop": "creatorId",
      hide: true,
    }, {
      "type": "input",
      "label": "创建人名称",
      "prop": "creatorName",
      hide: true,
    }, {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      hide: true,
    }, {
      "type": "input",
      "label": "数据更新时间",
      "prop": "updateTime",
      hide: true,
    }, {
      "type": "input",
      "label": "删除标志 1：删除 0：未删",
      "prop": "delFlag",
      hide: true,
    }]
}


export const formOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  submitBtn: false,
  emptyBtn: false,
  menuBtn: false,
  labelWidth: 130,
  "column": [
    {
      "type": "select",
      "label": "售票员",
      "prop": "conductorName",
      search: true,
      component: 'user-select',
      params: {
        userCodeKey: 'conductorJobNo',
        operateNo: "deviceOperateNum"
      },
      span: 8,
      rules:[{
        required:true,
        message:"请输入售票员！",
        trigger:"blur"
      }]
    }, {
      width: 100,
      "type": "input",
      "label": "售票员工号",
      "prop": "conductorJobNo",
      hide: true,
      display: false,
    }, {
      "type": "date",
      "label": "日期",
      "prop": "opertorTime",
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      span: 8,
      rules: [{
        required: true,
        message: "请选择日期！",
        trigger: "blur"
      }]
    }, {
      width: 100,
      "type": "select",
      "label": "售票员班次",
      "prop": "conductorShifts",
      hide: true,
      dicUrl: '/admin/dict/type/stm_conductor_shift',
      span: 8,
      rules: [{
        required: true,
        message: "请选择售票员班次！",
        trigger: "blur"
      }]
    },{
      type: "select",
      label: "设备操作号",
      prop: "deviceOperateNum",
      search: "true",
      searchLabelWidth: 100,
      dicUrl: "/support/swpmdeviceoperationcode/page",
      props: {
        label: "operationCode",
        value: "operationCode",
        res: "data.records"
      },
      filterable: true,
      allowCreate: true,
      dicQuery: {
        size: -1
        //TODO 过滤售票员
      },
      span: 8,
      rules: [
        {
          required: true,
          message: "请选择设备操作号"
        }
      ]
    },{
      type: "select",
      label: "BOM编号",
      prop: "bomCode",
      rules: [
        {
          required: true,
          message: "请输入BOM编号"
        }
      ],
      span: 8,
      filterable: true,
      dicUrl: "/admin/dict/type/bom_code",
      multiple: true
    }
    ]
}


export const tableOptionMerge = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  submitBtn: false,
  emptyBtn: false,
  menuBtn: false,
  labelWidth: 130,
  "column": [
    {
      "type": "select",
      "label": "售票员",
      "prop": "conductorName",
      span: 8,
      rules:[{
        required:true,
        message:"请输入售票员！",
        trigger:"blur"
      }],
      disabled: true
    }, {
      width: 100,
      "type": "input",
      "label": "售票员工号",
      "prop": "conductorJobNo",
      hide: true,
      display: false,
    }, {
      "type": "date",
      "label": "日期",
      "prop": "opertorTime",
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      span: 8,
      rules: [{
        required: true,
        message: "请选择日期！",
        trigger: "blur"
      }]
    }, {
      width: 100,
      "type": "select",
      "label": "售票员班次",
      "prop": "conductorShifts",
      hide: true,
      dicUrl: '/admin/dict/type/stm_conductor_shift',
      span: 8,
      rules: [{
        required: true,
        message: "请选择售票员班次！",
        trigger: "blur"
      }],
      disabled: true
    },{
      width: 100,
      type: "select",
      label: "设备操作号",
      prop: "deviceOperateNum",
      dicUrl: "/support/swpmdeviceoperationcode/page",
      props: {
        label: "operationCode",
        value: "operationCode",
        res: "data.records"
      },
      filterable: true,
      allowCreate: true,
      dicQuery: {
        size: -1
        //TODO 过滤售票员
      },
      span: 8,
      rules: [
        {
          required: true,
          message: "请选择设备操作号"
        }
      ],
      disabled: true
    },{
      type: "select",
      label: "BOM编号",
      prop: "bomCode",
      rules: [
        {
          required: true,
          message: "请输入BOM编号"
        }
      ],
      span: 8,
      filterable: true,
      dicUrl: "/admin/dict/type/bom_code",
      multiple: true
    }
    ]
}

export const formOptionView = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  submitBtn: false,
  emptyBtn: false,
  menuBtn: false,
  labelWidth: 130,
  "column": [
    {
      "type": "select",
      "label": "售票员",
      "prop": "conductorName",
      search: true,
      component: 'user-select',
      disabled:true,
      params: {
        userCodeKey: 'conductorJobNo'
      },
      span: 8,
      rules: [{
        required: true,
        message: "请输入售票员！",
        trigger: "blur"
      }]
    }, {
      width: 100,
      "type": "input",
      "label": "售票员工号",
      "prop": "conductorJobNo",
      hide: true,
      display: false,
    }, {
      "type": "date",
      "label": "日期",
      "prop": "opertorTime",
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      span: 8,
      disabled:true,
      rules: [{
        required: true,
        message: "请选择日期！",
        trigger: "blur"
      }]
    }, {
      width: 100,
      "type": "select",
      "label": "售票员班次",
      "prop": "conductorShifts",
      hide: true,
      disabled: true,
      dicUrl: '/admin/dict/type/stm_conductor_shift',
      span: 8,
      rules: [{
        required: true,
        message: "请选择售票员班次！",
        trigger: "blur"
      }]
    },
  ]
}

export const tableOptionRecords = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  submitBtn: false,
  emptyBtn: false,
  editBtn: false,
  delBtn: false,
  addBtn: false,
  refreshBtn: false,
  "column": [
    {
      "type": "select",
      "label": "售票员",
      "prop": "conductorName",
      component: 'user-select',
      params: {
        userCodeKey: 'conductorJobNo'
      }
    }, {
      width: 100,
      "type": "input",
      "label": "售票员工号",
      "prop": "conductorJobNo"
    }, {
      "type": "date",
      "label": "日期",
      "prop": "opertorTime",
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd'
    }, {
      width: 100,
      "type": "select",
      "label": "售票员班次",
      "prop": "conductorShifts",
      dicUrl: '/admin/dict/type/stm_conductor_shift'
    }
  ]
}

